﻿using Inovout.Data.Domain;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;

namespace Inovout.Membership.Domain
{
    partial class Membership : DataObject
    {
        public Membership()
        {
        }

        [Required(ErrorMessage = "名称不可为空")]
        [Alias("名称")]
        public virtual string Name { get; set; }

        private MembershipType type;
        public virtual MembershipType Type 
        {
            get { return this.type; }
        }

        private ISet<Actor> actors;
        public virtual ISet<Actor> Actors 
        {
            get 
            {
                if (actors == null) 
                {
                    actors = new HashSet<Actor>();
                    //actors.Add(Actor.GetGeneralActor(this));
                }
                return actors;
            }
            set { actors = value; }
        }
    }
}
